package com.itheima.info.manager.controller;

import com.itheima.info.manager.Util.AgeUtil;
import com.itheima.info.manager.domain.Student;

public class OtherStudentController extends BaseStudentController{
    @Override
    public Student sealStudent(String sSid) {

        System.out.println("请输入学生姓名:");
        String name = sc.next();
        System.out.println("请输入学生出生日期(yyyy-MM-dd):");
        String birthday = sc.next();

        String age = AgeUtil.getAge(birthday);

        //有参构造创建学生对象
        Student stu = new Student(sSid,name,age,birthday);

        return stu;
    }
}
